import type {UserConfig} from 'vite';
import {resolve} from 'path';
import dts from 'vite-plugin-dts';

export default (): UserConfig => {
    return {
        build: {
            target: 'ESNext',
            minify: true,
            lib: {
                entry: 'src/index.ts',
                name: 'nr-utils',
                fileName: 'index'
            }
        },
        plugins: [
            dts({
                outDir: resolve(__dirname, './dist'),
            })
        ],
    };
};
